﻿<%@ Page Title="" Language="C#" MasterPageFile="~/DefaultSite.Master" AutoEventWireup="true"
    CodeBehind="InputOptionInfo.aspx.cs" Inherits="SocialIn.Web.Members.InputOptionInfo" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        $(function () {
            $("#<%= binChangeOK.ClientID %>").click(function () {

                return true;
            });

            $("#btnPaw").click(function () {

                var oldPaw = $.trim($("#oldpaw").attr('value'));

                if (oldPaw.length <= 0) {
                    alert("기존 비밀번호르 입력해주세요!");
                    return;
                }

                var tempPaw1 = $.trim($("#paw01").attr('value'));
                var tempPaw2 = $.trim($("#paw02").attr('value'));

                if (tempPaw1.length <= 0 || tempPaw2.length <= 0) {
                    alert("변경 할 비밀번호를 입력해 주세요!");
                    return;
                }

                if (tempPaw1 != tempPaw2)
                    alert("변경할 비밀번호를 다시 확인해 주세요!");

                $.post('ChangePaw.aspx', { 'temp': tempPaw2, 'oldpass': oldPaw }, function (result) {
                    var message = "";
                    switch (result) {
                        case "0":
                            message = "* 변경되었습니다!";
                            break;
                        case "-1":
                            message = "* 잘못된 요청입니다.로그인및 입력정보를 다시 확인바랍니다!"
                            break;
                        case "1":
                            message = "* 입력한 비밀번호가 이상이 있습니다!";
                            break;
                    }

                    alert(message);
                });
            });

            $("#btnChangePicture").click(function () {
                window.open('ProfileImageUp.aspx', 'child', 'height=100px; width=150px;');
            });

        });

        function btntest01_Click() {
            var fpath = document.getElementById("filename").value;
            document.getElementById("<%= imgUserPicture.ClientID %>").src = fpath;
        }

        function OpentImage() {
            window.open(document.getElementById("<%= imgUserPicture.ClientID %>").src, 'image', null);
        }


    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="border: 1px solid; padding: 0 0 0 5px;">
        <input type="hidden" id="filename" value="" />
        <input type="button" id="btntest01" onclick="btntest01_Click();" />
        <div id="info_title">
            <h2>
                등록 정보 수정 -
                <%= PageType %></h2>
            <div>
                <a href="javascript:OpentImage();" >
                    <asp:Image runat="server" Style="max-width: 48px; max-height: 48px;" ID="imgUserPicture" /></a><br />
                <input type="button" id="btnChangePicture" value="수정하기" />
            </div>
            <div>
                <div style="float: left;">
                    <h3>
                        이름</h3>
                </div>
                <div style="float: left;">
                    <asp:TextBox runat="server" ID="txtName" />
                </div>
            </div>
            <div style="clear: both;">
                <div>
                    <h3>
                        이메일</h3>
                    <asp:Literal runat="server" ID="ltrmail" />
                </div>
                <div style="clear: both;">
                    <h3>
                        소개</h3>
                    <asp:TextBox runat="server" ID="txtIntroduction" TextMode="MultiLine" Style="width: 300px;
                        height: 100px;" />
                </div>
                <div>
                    <h3>
                        주소</h3>
                    <asp:TextBox runat="server" ID="txtAddress" />
                </div>
                <div>
                    <h3>
                        연락처</h3>
                    <asp:TextBox runat="server" ID="txtPhoneNum" MaxLength="14" />
                </div>
                <div>
                    <h3>
                        재능 카테고리</h3>
                    <div>
                        <asp:DataList runat="server" RepeatColumns="4" RepeatDirection="Horizontal" ID="dlTalentCategory"
                            OnItemDataBound="dlTalentCategory_DataBound">
                            <ItemTemplate>
                                <img alt="<%# Eval("CODENAME") %>" src="<%# Eval("ETC1") %>" />
                                <asp:CheckBox runat="server" ID="cbTalent" />
                                <asp:HiddenField runat="server" ID="hidCode" />
                                <div>
                                </div>
                            </ItemTemplate>
                        </asp:DataList>
                    </div>
                </div>
                <div>
                    <div id="pawPanel">
                        기존 비밀번호 :
                        <input type="password" id="oldpaw" /><br />
                        변경 비밀번호 :
                        <input type="password" id="paw01" /><br />
                        변경 확인 :
                        <input type="password" id="paw02" />
                        <input type="button" id="btnPaw" value="변경" />
                    </div>
                </div>
                <div>
                    <asp:Button runat="server" ID="binChangeOK" Text="확인" OnClick="binChangeOK_Click" />
                    <input type="button" value="취소 " />
                </div>
            </div>
        </div>
    </div>
</asp:Content>
